import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { AuthGuard } from "./core/service/auth.guard";
import {
  CourseComponent, TeacherComponent, SystemFormComponent,
  SystemFormControlComponent, SystemFormIndexComponent, DictionaryComponent,
  DrillSubjectComponent, DrillIndexComponent,
  DrillFlowComponent, StudentJoinCourseComponent, StudentDrillIndexComponent, MyDrillComponent, RoomComponent,
  ManagementComponent, StumanagementComponent, ManagementIndexComponent, FacultymanageComponent
} from "./system";
import { LoginComponent, IndexComponent, HomeComponent } from "./system-index";
import { SystemUserComponent } from "./system/system-user/system-user.component";
import { GameHallIndexComponent } from "./game-hall/game-hall-index/game-hall-index.component";
import { StudentDrillAddComponent } from "./system/student-drill/my-drill-add/my-drill-add.compopnent";
import { StudentDrillEditComponent } from "./system/student-drill/my-drill-edit/my-drill-edit.component";
import { GameHallComponent } from "./game-hall/game-hall/game-hall.component";
import { DrillContentComponent } from "./system/student-drill/drill-content/drill-content.component";
import { NoticeComponent } from './system/notice/noticelist/notice.component';
import { CourseScoreComponent } from "./system/course/courseScore/course-score.component";
import { CourseScoreEditComponent } from "./system/course/course-score-edit/course-score-edit.component";
import { StudentDrillReportComponent } from "./system/student-drill/my-drill-report/my-drill-report.component";
import { MarkInquiryComponent } from "./system/mark/mark-inquiry/mark-inquiry.component";
import { MarkInquiryStudentComponent } from "./system/mark/mark-inquiry-student/mark-inquiry-student.component";
import { DrillProjectComponent } from "./system/drill/drill-project.component";
import { SchoolComponent } from "./system/school/school.component";
import { SchoolAddComponent } from "./system/school/school-add/school-add.component";
import { SchoolindexComponent } from "./system/school/schoolindex/schoolindex.component";
import { SchooleditComponent } from "./system/management/schooledit/schooledit.component";
import { SchooleditaddComponent } from "./system/management/schooleditadd/schooleditadd.component";
import { AuthoritymanagementComponent } from "./system/authoritymanagement/authoritymanagement.component";
import { ClassmanagementComponent } from "./system/classmanagement/classmanagement.component";
import { ClassindexComponent } from "./system/classmanagement/classindex/classindex.component";
import { ClassaddmanagementComponent } from "./system/classmanagement/classaddmanagement/classaddmanagement.component";
import { StudentmanageComponent } from "./system/classmanagement/studentmanage/studentmanage.component";
import { ClasseditComponent } from './system/classmanagement/classedit/classedit.component';
import { StudentindexComponent } from './system/studentmanage/studentindex/studentindex.component';
import { StudentaddComponent } from './system/studentmanage/studentadd/studentadd.component';
import { StudentmanagexeComponent } from './system/studentmanage/studentmanagexe.component';
import { TeacherindexComponent } from './system/teachermanage/teacherindex/teacherindex.component';
import { TeacheraddComponent } from './system/teachermanage/teacheradd/teacheradd.component';
import { TeachermanageComponent } from './system/teachermanage/teachermanage.component';
import { ScoreManagerIndexComponent } from "./teacher-client/score-manager-index/score-manager-index.component";
import { ScoreClassComponent } from "./teacher-client/score-manager-index/score-class/score-class.component";
import { ScoreManagerComponent } from "./teacher-client/score-manager-index/score-manager/score-manager.component";
import { ClassScoreSetComponent } from "./teacher-client/score-manager-index/class-score-set/class-score-set.component";
import { TeacherClassIndexComponent } from './system/teacher-class/teacher-class-index/teacher-class-index.component';
import { TeacherStudentIndexComponent } from './system/teacher-student/teacher-student-index/teacher-student-index.component';
import { TeacherClassComponent } from './system/teacher-class/teacher-class.component';
import { TeacherStudentComponent } from './system/teacher-student/teacher-student.component';
import { StudentremoveComponent } from './system/teacher-class/studentremove/studentremove.component';
import { TeacherStudentEditComponent } from './system/teacher-student/teacher-student-edit/teacher-student-edit.component';
import { StudentStdIndexComponent } from './system/student-std/student-std-index/student-std-index.component';
import { StudentStdEditComponent } from './system/student-std/student-std-edit/student-std-edit.component';
import { StudentStdComponent } from './system/student-std/student-std.component';
import { StuentTrainIndexComponent } from './system/studenttrain/stuent-train-index/stuent-train-index.component';
import { StudenttrainComponent } from './system/studenttrain/studenttrain.component';
import { MytrainIndexComponent } from './system/mytrain/mytrain-index/mytrain-index.component';
import { MytrainComponent } from './system/mytrain/mytrain.component';
import { MyscoreIndexComponent } from './system/myscore/myscore-index/myscore-index.component';
import { MyscoreComponent } from './system/myscore/myscore.component';
import { StudentScoreListComponent } from "./teacher-client/score-manager-index/student-score-list/student-score-list.component";
import { StudentScoreSetComponent } from "./teacher-client/score-manager-index/student-score-set/student-score-set.component";
import { StuentTraiComponent } from "./system/teacher-class/stuent-trai/stuent-trai.component";
import { FeedbackComponent } from "./system/feedback/feedback.component";
import { FeedbackIndexComponent } from "./system/feedback/feedback-index/feedback-index.component";
import { FeedbackAddComponent } from "./system/feedback/feedback-add/feedback-add.component";
import { FeedbackGetlistComponent } from "./system/feedback/feedback-getlist/feedback-getlist.component";
import { FeedbaceEditComponent } from "./system/feedback/feedbace-edit/feedbace-edit.component";
import { GrillbgComponent } from "./system/drill/grillbg/grillbg.component";
import { GrillGuideComponent } from "./system/drill/grill-guide/grill-guide.component";
import { GrillDataComponent } from "./system/drill/grill-data/grill-data.component";
import { TeacherhomeComponent } from "./system/teacherhome/teacherhome.component";
import { TeacherstudentindexComponent } from "./system/teacherstudentindex/teacherstudentindex.component";
import { InformComponent } from "./system/inform/inform.component";
import { StudentchatComponent } from "./system/studentchat/studentchat.component";
import { StudentchatindexComponent } from "./system/studentchat/studentchatindex/studentchatindex.component";
import { RoleTemplateComponent } from "./super-admin-client/role-template/role-template.component";
import { DrillDragContentComponent } from "./system/student-drill/drill-drag-content/drill-drag-content.component";
import { StudentJoinClassRequestComponent } from "./teacher-client/student-join-class-request/student-join-class-request.component";
import { StudentGroupDrillScoreComponent } from "./teacher-client/score-manager-index/student-group-drill-score/student-group-drill-score.component";
import { UserContentComponent } from "./system-index/user-content/user-content.component";
import { VideoTeachingComponent } from "./system/video-teaching/video-teaching.component";
import { TrainingProcessComponent } from "./system/training-process/training-process.component";

const routes: Routes = [
  {
    path: 'app', component: IndexComponent, canActivate: [AuthGuard], data: { caption: '实训系统' },
    children: [
      { path: 'home', component: HomeComponent, data: { caption: '我的桌面' } },
      { path: 'course', component: CourseComponent, data: { caption: '课程管理' } },
      { path: 'user-content', component: UserContentComponent, data: { caption: '用户信息修改' } },
      { path: 'courseScore/:id', component: CourseScoreComponent, data: { caption: '课程打分' } },
      { path: 'courseScoreEdit/:id', component: CourseScoreEditComponent, data: { caption: '课程打分' } },
      {
        path: 'scoremanager', component: ScoreManagerIndexComponent,
        children: [
          { path: 'class', component: ScoreClassComponent, data: { caption: '学生管理' } },
          { path: 'classset/:id', component: ClassScoreSetComponent, data: { caption: '班级演练分数设置' } },
          { path: 'studentscore/:id', component: StudentScoreListComponent, data: { caption: '成绩列表' } },
          { path: 'student-group-drill-score', component: StudentGroupDrillScoreComponent, data: { caption: '成绩列表' } },
          { path: 'StudentScoreSet', component: StudentScoreSetComponent, data: { caption: '成绩列表' } },
          { path: 'index', component: ScoreManagerComponent, data: { caption: '班级管理' } },
          { path: '', redirectTo: 'index', pathMatch: 'full' },
        ]
      },
      { path: 'markInquiryStudent', component: MarkInquiryStudentComponent, data: { caption: '成绩查询' } },
      {
        path: 'feedIndex', component: FeedbackIndexComponent,
        children: [
          { path: 'feedback', component: FeedbackComponent, data: { caption: '反馈信息' } },
          { path: 'feedadd', component: FeedbackAddComponent, data: { caption: '添加信息' } },
          { path: 'feededit', component: FeedbaceEditComponent, data: { caption: '编辑信息' } },
          { path: 'feedlist', component: FeedbackGetlistComponent, data: { caption: '详细信息' } },
          { path: '', redirectTo: 'feedback', pathMatch: 'full' },
          { path: '**', redirectTo: 'feedback' }
        ]
      },
      { path: 'dictionary', component: DictionaryComponent, data: { caption: '字典管理' } },
      { path: 'joincourse', component: StudentJoinCourseComponent, data: { caption: '课程申请' } },
      { path: 'systemuser', component: SystemUserComponent, data: { caption: '系统用户管理' } },
      { path: 'student-join-class', component: StudentJoinClassRequestComponent, data: { caption: '学生加入课程申请' } },
      {
        path: 'systemform', component: SystemFormIndexComponent,
        children: [
          { path: 'sft', component: SystemFormControlComponent, data: { caption: '表单详情' } },
          { path: 'index', component: SystemFormComponent, data: { caption: '表单管理' } },
          { path: '', redirectTo: 'index', pathMatch: 'full' },
          { path: '**', redirectTo: 'index' }
        ]
      },
      {
        path: 'teacher', component: TeacherComponent,
        children: [
          { path: 'index', component: TeacherComponent, data: { caption: '教师管理' } },
          { path: '', redirectTo: 'index', pathMatch: 'full' },
          { path: '**', redirectTo: 'index' }
        ]
      },
      {
        path: 'notice', component: NoticeComponent, data: { caption: '通知管理' }
      },
      // 大管理员-学校管理
      {
        path: 'schoolindex', component: SchoolindexComponent, data: { caption: '学校管理' },
        children: [
          { path: 'school', component: SchoolComponent },
          { path: "schooladd", component: SchoolAddComponent, data: { caption: '学校添加' } },
          { path: '', redirectTo: 'school', pathMatch: 'full' },
          { path: '**', redirectTo: 'school' }

        ]
      },
      // 大管理员-院管理
      {
        path: 'management', component: ManagementIndexComponent,
        children: [
          { path: 'index', component: ManagementComponent, data: { caption: '学院管理' } },
          { path: 'stumanagement', component: StumanagementComponent, data: { caption: '学院管理' } },
          { path: 'schooledit', component: SchooleditComponent, data: { caption: '学院管理' } },
          { path: 'schooleditadd', component: SchooleditaddComponent, data: { caption: '学院管理' } },
          { path: '', redirectTo: 'index', pathMatch: 'full' },
          { path: '**', redirectTo: 'index' }
        ]
      },
      // 院校端--系管理
      { path: 'faculty', component: FacultymanageComponent, data: { caption: '院系管理' } },
      // 院校端-权限管理
      { path: 'authoritymanagement', component: AuthoritymanagementComponent, data: { caption: '权限管理' } },
      // 院校端-班级管理
      {
        path: 'classindex', component: ClassindexComponent, data: { caption: '班级管理' },
        children: [
          { path: 'classmanagement', component: ClassmanagementComponent },
          { path: "classaddmanagement", component: ClassaddmanagementComponent },
          { path: "studentmanage", component: StudentmanageComponent, data: { caption: '学生管理' } },
          { path: "classedit", component: ClasseditComponent, data: { caption: '班级编辑' } },
          { path: '', redirectTo: 'classmanagement', pathMatch: 'full' },
          { path: '**', redirectTo: 'classmanagement' }

        ]
      },
      // 院校端-学生管理
      {
        path: 'studentindex', component: StudentindexComponent, data: { caption: '学生管理' },
        children: [
          { path: 'studentmanagexe', component: StudentmanagexeComponent },
          { path: "studentadd", component: StudentaddComponent, data: { caption: '学生添加' } },
          { path: '', redirectTo: 'studentmanagexe', pathMatch: 'full' },
          { path: '**', redirectTo: 'studentmanagexe' }
        ]
      },
      // 院校端-教师管理
      {
        path: 'teacherindex', component: TeacherindexComponent, data: { caption: '教师管理' },
        children: [
          { path: 'teachermanage', component: TeachermanageComponent },
          { path: "teacheradd", component: TeacheraddComponent, data: { caption: '教师添加' } },
          { path: '', redirectTo: 'teachermanage', pathMatch: 'full' },
          { path: '**', redirectTo: 'teachermanage' }

        ]
      },
      // 教师端-班级管理
      {
        path: 'teacherclassindex', component: TeacherClassIndexComponent, data: { caption: '班级管理' },
        children: [
          { path: 'teacherclass', component: TeacherClassComponent },
          { path: "studentremove", component: StudentremoveComponent, data: { caption: '学生移除' } },
          { path: 'studenttair', component: StuentTraiComponent },
          { path: '', redirectTo: 'teacherclass', pathMatch: 'full' },
          { path: '**', redirectTo: 'teacherclass' }

        ]
      },
      // 教师端-学生管理
      {
        path: 'teacherindex', component: TeacherindexComponent, data: { caption: '教师管理' },
        children: [
          { path: 'teachermanage', component: TeachermanageComponent },
          { path: "teacheradd", component: TeacheraddComponent, data: { caption: '教师添加' } },
          { path: '', redirectTo: 'teachermanage', pathMatch: 'full' },
          { path: '**', redirectTo: 'teachermanage' }
        ]
      },

      {
        path: 'teacherstudentindex', component: TeacherStudentIndexComponent, data: { caption: '学生管理' },
        children: [
          { path: 'teacherstudent', component: TeacherStudentComponent },
          { path: "studentedit", component: TeacherStudentEditComponent },
          { path: '', redirectTo: 'teacherstudent', pathMatch: 'full' },
          { path: '**', redirectTo: 'teacherstudent' }

        ]
      },
      // 学生端-班级列表
      {
        path: 'studentstdindex', component: StudentStdIndexComponent, data: { caption: '班级列表' },
        children: [
          { path: 'studentstd', component: StudentStdComponent },
          { path: "studentstdedit", component: StudentStdEditComponent },
          { path: '', redirectTo: 'studentstd', pathMatch: 'full' },
          { path: '**', redirectTo: 'studentstd' }

        ]
      },
      // 学生端-实训项目
      {
        path: 'studenttrainindex', component: StuentTrainIndexComponent, data: { caption: '实训项目' },
        children: [
          { path: 'studenttrain', component: StudenttrainComponent },
          { path: '', redirectTo: 'studenttrain', pathMatch: 'full' },
          { path: '**', redirectTo: 'studenttrain' }

        ]
      },
      // 学生端-我的实训
      {
        path: 'mytrainindex', component: MytrainIndexComponent, data: { caption: '我的实训' },
        children: [
          { path: 'mytrain', component: MytrainComponent },
          { path: '', redirectTo: 'mytrain', pathMatch: 'full' },
          { path: '**', redirectTo: 'mytrain' }

        ]
      },
      // 学生端-我的成绩
      {
        path: 'myscoreindex', component: MyscoreIndexComponent, data: { caption: '我的实训' },
        children: [
          { path: 'myscore', component: MyscoreComponent },
          { path: '', redirectTo: 'myscore', pathMatch: 'full' },
          { path: '**', redirectTo: 'myscore' }

        ]
      },
      // 教师home

      {
        path: 'teacherstudentindexadmin', component: TeacherstudentindexComponent, data: { caption: '主页' }
      },
      // 学生聊天

      {
        path: 'studentchatindex', component: StudentchatindexComponent,
        children: [
          { path: 'studentchat', component: StudentchatComponent, data: { caption: '学生聊天' } },
          { path: '', redirectTo: 'studentchat', pathMatch: 'full' },
          { path: '**', redirectTo: 'studentchat' }
        ]
      },



      {
        path: 'adminnotice', component: InformComponent, data: { caption: '通知' }
      },
      {
        path: 'drill', component: DrillIndexComponent,
        children: [
          { path: 'index', component: DrillProjectComponent, data: { caption: '实训项目管理' } },
          { path: 'subject', component: DrillSubjectComponent, data: { caption: '实训项目管理 / 项目主题管理' } },
          { path: 'flow', component: DrillFlowComponent, data: { caption: '实训项目管理 / 项目主题管理 / 主体流程管理' } },
          { path: 'drillbg', component: GrillbgComponent, data: { caption: '实训项目管理 / 项目主题管理 / 案例背景' } },
          { path: 'drillguide', component: GrillGuideComponent, data: { caption: '实训项目管理 / 项目主题管理 / 实训指导' } },
          { path: 'drilldata', component: GrillDataComponent, data: { caption: '实训项目管理 / 项目主题管理 / 课程资料' } },
          { path: 'roletemplate', component: RoleTemplateComponent, data: { caption: '实训项目管理 / 项目主题管理 / 角色演练模板' } },
          { path: '', redirectTo: 'index', pathMatch: 'full' },
          { path: '**', redirectTo: 'index' }
        ]
      },
      {
        path: 'mydrill', component: StudentDrillIndexComponent, data: { caption: '我的演练' },
        children: [
          {
            path: 'hall', component: GameHallIndexComponent,
            children: [
              { path: 'index', component: GameHallComponent, data: { caption: '演练大厅' } },
              { path: 'room', component: RoomComponent, data: { caption: '演练房间' } },
              // { path: 'rooms', component: RoomComponent, data: { caption: '演练房间1' } },
              { path: '', redirectTo: 'index', pathMatch: 'full' },
              { path: '**', redirectTo: 'index' }
            ]
          },
          { path: 'drillcontent', component: DrillContentComponent, data: { caption: '演练' } },
          { path: 'index', component: MyDrillComponent, data: { caption: '演练内容' } },
          { path: 'adddrill', component: StudentDrillAddComponent, data: { caption: '添加演练' } },
          { path: 'editdrill/:id', component: StudentDrillEditComponent, data: { caption: '编辑演练' } },
          { path: 'reportdrill/:id', component: StudentDrillReportComponent, data: { caption: '编辑演练' } },
          { path: '', redirectTo: 'index', pathMatch: 'full' },
          { path: '**', redirectTo: 'index' }
        ]
      },

      { path: '', redirectTo: 'home', pathMatch: 'full', data: { caption: '我的桌面' } },
      { path: '**', redirectTo: 'home' }
    ]
  },
   // 视频教学
   {
    path: 'videoteaching', component: VideoTeachingComponent, data: { caption: '视频教学' },
  },
  { path: 'trainingprocess', component: TrainingProcessComponent, pathMatch: 'full', data: { caption: '实训流程' } },
  { path: 'drag-train', component: DrillDragContentComponent, pathMatch: 'full', data: { caption: '演练内容' } },
  { path: 'mydrillcontent', component: DrillContentComponent, pathMatch: 'full', data: { caption: '演练内容' } },
  { path: 'login', component: LoginComponent },
  { path: '', redirectTo: 'app', pathMatch: 'full' },
  { path: '**', redirectTo: 'app' }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
